<?php
use yii\helpers\Html;
use app\assets\AdminLoginAsset;
use \yii\widgets\ActiveForm;
use yii\helpers\Url;
use yii\captcha\Captcha;
AdminLoginAsset::register($this);
?>
<?php $this->beginPage();?>
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <title>新用户注册</title>
        <meta charset="UTF-8">
        <meta name="keywords" content="">
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=0" name="viewport">
        <meta content="yes" name="apple-mobile-web-app-capable">
        <meta content="black" name="apple-mobile-web-app-status-bar-style">
        <meta content="telephone=no" name="format-detection">
        <?php $this->head();?>
        <style>
            .ie-content{  position: fixed; left: 0; top: 0; right: 0; bottom:0; background:#fff; z-index: 1000;}
            .ie-content-bj{ width: 1000px; height: 380px; position: fixed; left: 50%; top: 36%; margin:-190px 0 0 -500px; background:url(img/sj.jpg) no-repeat; }
            .ie-list{ padding:168px 0 0 371px; }
            .ie-list a{ margin-right: 80px; }

            #particles-js {
                width: 100%;
                height: 100%;
                /* background: #000; */
                background-size: cover;
                background-position: 50% 50%;
                background-repeat: no-repeat;
            }
        </style>
    </head>
    <body class="body_bj">
    <?php $this->beginBody();?>
    <div id="particles-js">
        <div class="login">
            <div class="logo">
                新用户注册
            </div>
            <ul class="login-list">
                <?php $form = ActiveForm::begin([
                    'id'=>'login-form',
                    'method'=>'post',
                    'fieldConfig' => [
                        'template' => "<div class=\"col-lg-5\">{input}</div>\n<div class=\"col-lg-3 layui-bg-red\">{error}</div>",
                    ]]) ?>
                <li><?php echo $form->field($model,'telephone')->textInput(['placeholder'=>"输入你的手机号码"])->label(false);?></li>
                <li><?php echo $form->field($model,'email')->textInput(['placeholder'=>"请输入你的有效邮箱"])->label(false);?></li>
<!--                <li><input type="text" placeholder="请输入短信验证码"><button class="yzm" >获取验证码</button><button class="yzm gray" style="display: none;">重新获取(58s)</button></li>-->
<!--                <li>--><?php //echo $form->field($model,'nickname')->textInput(['placeholder'=>'请输入用户名'])->label(false);?><!--</li>-->
                <li><?php echo $form->field($model,'password')->passwordInput(['placeholder'=>'请输入密码'])->label(false); ?></li>
                <li><?php echo $form->field($model,'password2')->passwordInput(['placeholder'=>'请确认密码'])->label(false); ?></li>
                <li><?php echo $form->field($model,'verifyCode')->widget(Captcha::className(),['captchaAction'=>'/admin/login/captcha','template'=>'{input}<span class="yzm2">{image}</span>','imageOptions'=>['title'=>'点击刷新','alt'=>'点击刷新'],'options' => ['placeholder' => '请输入验证码']])->label(false)?></li>
                <div class="form-group">
                    <div class="col-lg-offset-1 col-lg-11">
                        <?= Html::submitButton('确认并注册', ['class' => 'btn btn-primary btn-block', 'name' => 'submit-button']);?>
                    </div>
                </div><br>
                <li class="tar">
                    <a href='<?php echo Url::toRoute(['forget'])?>'>忘记密码</a>&nbsp&nbsp&nbsp
                    <a href='<?php echo Url::toRoute(['login']) ?>'>我要登录</a>
                </li>
                <?php ActiveForm::end() ?>
            </ul>
        </div>
    </div>
    <!--[if lt IE 8]>
    <div class="ie-content">
        <div class="ie-content-bj">
            <div class="ie-list">
                <a href="http://www.google.cn/intl/zh-CN/chrome/browser/"><img src="img/sj1.jpg" alt=""></a>
                <a href="http://www.firefox.com.cn/"><img src="img/sj2.jpg" alt=""></a>
                <a href="http://chrome.360.cn/"><img src="img/sj3.jpg" alt=""></a>
            </div>
        </div>
    </div>
    <![endif]-->
    <?php $this->beginBlock('test');?>
    layui.use(['jquery', 'layer'], function () {
    var $ = layui.jquery,
    layer = layui.layer;
    });
    <?php $this->endBlock() ?>
    <?php $this->registerJs($this->blocks['test'], \yii\web\View::POS_END); ?>
    <?php $this->beginBlock('test1');?>
    particlesJS('particles-js',
    {
    "particles": {
    "number": {
    "value": 40,  //数量
    "density": {
    "enable": true,
    "value_area": 800
    }
    },
    "color": {
    "value": "#ffffff"
    },
    "shape": {
    "type": "circle",
    "stroke": {
    "width": 0,
    "color": "#000000"
    },
    "polygon": {
    "nb_sides": 5
    },
    "image": {
    "src": "img/github.svg",
    "width": 100,
    "height": 100
    }
    },
    "opacity": {
    "value": 0.3,
    "random": false,
    "anim": {
    "enable": false,
    "speed": 1,
    "opacity_min": 0.1,
    "sync": false
    }
    },
    "size": {
    "value": 3,
    "random": true,
    "anim": {
    "enable": false,
    "speed": 40,
    "size_min": 0.1,
    "sync": false
    }
    },
    "line_linked": {
    "enable": true,
    "distance": 150,
    "color": "#ffffff",
    "opacity": 0.4,
    "width": 1
    },
    "move": {
    "enable": true,
    "speed": 1,
    "direction": "none",
    "random": false,
    "straight": false,
    "out_mode": "out",
    "bounce": false,
    "attract": {
    "enable": false,
    "rotateX": 600,
    "rotateY": 1200
    }
    }
    },
    "interactivity": {
    "detect_on": "canvas",
    "events": {
    "onhover": {
    "enable": true,
    "mode": "grab"
    },
    "onclick": {
    "enable": false,
    "mode": "push"
    },
    "resize": true
    },
    "modes": {
    "grab": {
    "distance": 150,
    "line_linked": {
    "opacity": 1
    }
    },
    "bubble": {
    "distance": 400,
    "size": 40,
    "duration": 2,
    "opacity": 8,
    "speed": 3
    },
    "repulse": {
    "distance": 200,
    "duration": 0.4
    },
    "push": {
    "particles_nb": 4
    },
    "remove": {
    "particles_nb": 2
    }
    }
    },
    "retina_detect": false
    }
    );
    <?php $this->endBlock() ?>
    <?php $this->registerJs($this->blocks['test1'], \yii\web\View::POS_END); ?>
    <?php $this->endBody();?>
    </body>
    </html>
<?php $this->endPage();